package com.example.leavejava.mapper;


import com.example.leavejava.domain.Add;
import com.example.leavejava.domain.Search;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Mapper
@Repository
public interface Leave {
    @Insert("INSERT INTO message_board_java (name,remark,leaveDate) VALUES (#{name},#{remark},#{leaveDate})")
    Boolean save(Add add);

    @Select("SELECT * FROM message_board_java WHERE name = #{name} order by id desc")
    List<Search> selectList(Search search);
}

